At present, a thermal printer is applied more and more widely, multiple heating units arranged in a row at an equal interval along a width direction (hereinafter referred to as horizontal) of a printing head are arranged on the printing head of the thermal printer, and every time when a printing medium is driven to move by a minimum unit length (i.e. one dot line) relative to the printing head along a direction (hereinafter referred to as vertical) perpendicular to the width direction of the printing head, the heating units are powered on to be heated to form printing dots corresponding to the heated heating units on the thermo-sensitive heating medium in contact with the printing head, thereby finishing printing a dot line image on the printing medium.
A printing resolution is an important index for measuring printing quality of the thermal printer, refers to maximum printable dots on a unit length of the printing medium during printing output, and is usually represented by Dots Per Inch (DPI). The printing resolution includes a horizontal printing resolution and a vertical printing resolution, wherein the horizontal printing resolution refers to maximum printable dots on a horizontal unit length of the printing medium during printing output, and is determined by an arrangement density (hereinafter referred as a resolution of the printing head) of the heating units of the printing head because the heating units of the printing head correspond to horizontal printing dots of the printing medium one to one; and the vertical printing resolution refers to maximum printable dots on a vertical unit length of the printing medium, i.e. the number of printing execution times of the printing head during the movement of the printing medium by the unit length, and is obviously determined by the movement length of the printing medium relative to the printing head during each printing of the printing head.
Above all, the horizontal printing resolution of the thermal printer is determined by the resolution of the printing head arranged on the thermal printer, and for example, a horizontal printing resolution of a printer provided with a printing head with a resolution of 203 dpi is 203 dpi. However, along with a change in an application condition, a user may need to regulate the horizontal printing resolution when using the printer, for example, when the user has a higher requirement on the printing quality, a higher horizontal printing resolution for printing is required, so that the printer is provided with a printing head with a higher resolution, such as a printing head with a resolution of 300 dpi or 600 dpi; while when the user has a lower requirement on the printing quality, a lower horizontal printing resolution for printing is required to increase a printing speed, so that the printer is provided with a printing head with a lower resolution, such as a printing head with a resolution of 203 dpi. In order to ensure the printing quality and the normal work of the printing head, a printer parameter related to the horizontal printing resolution is also required to be regulated after the horizontal printing resolution of the printer is regulated. For example, in order to keep an aspect ratio of a printed image or character unchanged, the vertical printing resolution is also required to be regulated according to the same ratio when the horizontal printing resolution is changed, and for another example, a data length of dot matrix data transmitted to the printing head is also required to be regulated according to the number of the heating units of the printing head every time when the dot line image is printed after the horizontal printing resolution is regulated. Therefore, after the resolution of the printing head of the printer is changed, that is, the horizontal printing resolution of the printer is changed, the printer is required to identify the resolution of the currently mounted printing head and regulate the printer parameter related to the horizontal printing resolution according to the resolution of the printing head.
A method for identifying the resolution of the printing head of the printer is disclosed in a related art, and according to the method, a Double In-line Package (DIP) switch for representing the resolution of the printing head is arranged on a control circuit board of the printer, and the printer determines the resolution of the printing head by detecting a state of the DIP switch, so that the horizontal printing resolution of the printer is determined, and the printer parameter related to the horizontal printing resolution is set.
According to the method for identifying the resolution of the printing head of the printer in the related art, after the resolution of the printing head of the printer is changed, the user needs to manually change the DIP switch on the control circuit board into a state corresponding to the resolution of the printing head, and such manual changing brings inconvenience to operation of the user, and easily causes an error; and when the user manually changes the DIP switch to cause the error, the resolution, detected by the printer, of the printing head is wrong, and a parameter setting error is further caused when the printer parameter related to the horizontal printing resolution is regulated, which may cause anomaly of a printed content of the printer as well as damage to the printing head.
For the problem of high error rate after the resolution of the printing head of the printer is changed in the prior art, there is yet no effective solution.